SerialSmart White Paper


SerialSmart

High-Performance Serial Communications for SPARC Computers

Abstract

GNP Computers designed the SerialSmart line of multiport serial devices to provide high performance serial I/O for Sun SPARC workstations and servers running the Solaris 2.x operating system.

Table of Contents

[ Next ]

  1. SerialSmart Design Philosophy
  2. SerialSmart Design Details
  3. Additional Benefits of SerialSmart
  4. Other Serial Solutions


1

SerialSmart Design Philosophy

[ Previous ] [ Next ] [ T of C ]
We kept three primary goals in mind when we designed the SerialSmart line of serial communication products. These goals were to:
  1. create devices with rock-solid reliability
  2. create products capable of providing serial I/O to many asynchronous devices with high performance
  3. achieve these goals with minimal impact on the host computer and its application software

Specifically, we wanted a family of devices that could take advantage of the speed and price points of the new, high-powered SPARCstations to drive large numbers of serial devices.

Rock-Solid Reliability

[ Previous ] [ Next ] [ T of C ]

Robust Hardware

SerialSmart products are robust enough to handle extreme physical conditions. Their RS-232 driver chips can withstand multiple ESD hits up to 10 kilovolts, and can be shorted to voltages up to ±30 volts indefinitely without damage to the driver hardware.

High Availability

With appropriate application software, SerialSmart may be used in high-availability or fault-tolerant system architectures. This allows the product to be used in ultra-critical applications where downtime is measured in thousands of dollars lost. An example of such an architecture is given later in this paper.

Ease of Use

SerialSmart products are easy to install and use. The installation process takes less than ten minutes, and the ports come up looking exactly like the native Sun ports to all applications, ready to run. Installation and configuration downtime is virtually eliminated.

High Performance Serial I/O

[ Previous ] [ Next ] [ T of C ]

Technical
Superiority

While maintaining compatibility with the Sun's standard serial ports, SerialSmart provides improved functionality. SerialSmart allows the user to take full advantage of modems and other serial devices, even those operating at 56K baud and beyond. How GNP achieved this goal while maintaining Sun port compatibility is explained later in this document.

Growth Options

Another critical design requirement for SerialSmart was that the products allow the user to choose the optimal hardware configuration for his or her application, and to add additional capacity later, if necessary, without changing the basic system configuration. As a result, a SerialSmart that supports 16 serial channels works exactly the same way as one that supports 32, 64, 96 or even 128 channels.

Minimal Impact on the Host

[ Previous ] [ Next ] [ T of C ]

Low CPU Impact

We carefully designed the SerialSmart family to have little or no impact on the host computer's performance, regardless of the number of serial ports being supported. We believe that serial I/O, even for vast quantities of data, should never adversely affect the CPU or other I/O-intensive processes and devices.

Software
Transparency

All serial ports on a SerialSmart act identically to the existing serial ports on the host machine. This eliminates any need to change or customize existing applications that use serial devices. Thus all ports present on the SerialSmart support all standard signals, including full modem control on all ports.


2

SerialSmart Design Details

[ Previous ] [ Next ] [
T of C ]

Hardware Components

[ Previous ] [
Next ] [
T of C ]
Each SerialSmart multiport serial device consists of a single SBus adapter card, an external chassis, and a 62-pin cable to connect the SBus card to the chassis.

Hardware
Components Image

The SBus Interface Card

[ Previous ] [ Next ] [
T of C ]

Onboard 68030 Processor

The SerialSmart SBus Adapter Card contains an onboard 68030 microprocessor dedicated to servicing the serial ports of the SerialSmart chassis. This 68030 acts as an I/O co-processor for the SPARC, greatly reducing the CPU cycles dedicated to controlling and maintaining serial devices. As a result, the load on the SPARC for large numbers of serial ports does not increase substantially, freeing up SPARC CPU cycles which may then be allocated to important application processes. This powerful design makes the SerialSmart an excellent solution for applications requiring many serial ports.

Shared Memory Segment

The SBus Adapter Card also contains a memory segment shared between the 68030 and the SPARC. All data communication between the SPARC and the 68030 is performed by manipulation of control registers and circular data buffers resident in the SRAM. The SerialSmart's low impact on the SPARCstation CPU performance is heavily tied to this design implementation, because the SPARC's task when servicing a serial device is reduced to the movement of data between main kernel memory and this shared memory segment.

Downloadable Firmware

The 68030 firmware which drives the SerialSmart is downloaded into the same shared memory segment when the SerialSmart device driver is loaded on the UNIX host. This design eliminates the need for PROM upgrades as the SerialSmart device driver and firmware evolve. This design also enables GNP to create and distribute custom drivers for customers with special firmware requirements, such as nonstandard buffer lengths or onboard DES encryption.

Physical Interface

[ Previous ] [
Next ] [
T of C ]

RS-232 Compatibility

To increase its interconnect density, SerialSmart uses RJ45 connectors for the RS232 lines. These ports use a standard pinout defined by the Electronic Industries' Association as EIA/TIA--561 "Simple 8 Position Non-Synchronous Interface between Data Terminal Equipment and Data Circuit-Terminating Equipment Employing Serial Binary Data Interchange." This pinout, for those who don't have a copy handy, is:

Pin Abbreviation Function

1

RI

Ring Indicator

2

DCD

Carrier Detect

3

DTR

Data Terminal Ready

4

GND

Signal Ground

5

RxD

Receive Data

6

TxD

Transmit Data

7

CTS

Clear to Send

8

RTS

Ready to Send

Selectable RI/DSR

This EIA standard includes the Ring Indicator pin but leaves out the Data Set Ready pin found on some serial ports. In the rare case of an application requiring a Data Set Ready pin, the SerialSmart device driver has a configuration option telling it to report the status of the Ring Indicator pin in the DSR field instead. Pin 1 of the RJ45 connector may then be wired to DSR of the device and the pin will function as DSR.

STREAMS Device Driver

[ Previous ] [
Next ] [
T of C ]
The SerialSmart features a STREAMs based device driver to provide maximum flexibility and ease of installation when using the product.

STREAMS Image

Driver Functions

The main task of the SerialSmart device driver is to push outbound data and signals from the user process downstream onto the SRAM on the SBus Adapter Card and to move inbound data and signals from the registers and circular buffers on the SBus card upstream towards a user process. Because the device driver does not need to interact with the low level hardware registers, the SPARC is freed of the additional overhead usually required to control and service I/O devices. This substantially reduces the strain on the SPARC, leaving it free to do other, more important, work. Even a heavily loaded SerialSmart configuration (SPARCstation 20 running Solaris 2.4, with four SBus cards, each driving a 64-port chassis, for a total of 256 ports) will consume under 3% of the SPARC's CPU resources while maintaining full blast serial I/O at 9600 baud.

Extended Baud Rate Selection

The SerialSmart device driver provides three methods of selecting baud rates above the 38.4K baud supported by standard Sun ioctls. Users may select any or all of these methods. The first method is to map the higher baud rates onto some of the seldom-used low baud rates as in the following table:

Ask for Baud Rate Actually get Baud Rate

110

57.6k

134

115.2k

150

230.4k

Since 110, 134, and 150 baud settings are supported by stty, tip, and other standard programs, no modification of the applications is required to make them access these special rates. If 110, 134, or 150 baud is actually desired on a port, then the mapping feature may be disabled.

The second method of accessing higher baud rates is to use a special program included with the GNP device driver. Given a port number and a baud rate, this program locks the port at that baud rate, ignoring any requests to change the baud rate. The port remains locked until the program is run again with the unlock option.

For users writing their own applications, GNP provides a C header file with definitions of the custom ioctls used to configure the port for the higher baud rates. This third method allows programs to access any of the following baud rates: 50, 75, 150, 200, 300, 450, 600, 900, 1200, 1800, 2400, 3600, 4800, 7200, 9600, 14.4k, 19.2k, 28.8k, 38.4k, 57.6k, 115.2k, and 230.4k. If future demand warrants it, then additional ioctls may be added to generate arbitrary custom baud rates for applications like MIDI.

No Hardware Interrupts

Another important design feature of the SerialSmart is that the device is not based on a hardware interrupt scheme. In doing our research, we at GNP determined that any design which depended on expensive per-character hardware interrupts to service inbound data I/O would suffer terribly for large numbers of I/O ports. Every time a SPARC receives a hardware interrupt, it must switch from the user context in which it is currently executing to a supervisor context in order to access the hardware and handle the interrupt. This forced switch is much more expensive than if the SPARC could plan to service the serial channel at a more convenient time. Thus the SerialSmart will never force the SPARC CPU to service expensive low-level hardware interrupts while processing serial I/O channels.

SerialSmart Device Driver Servicing Mechanism

[ Previous ] [
Next ] [
T of C ]
SerialSmart ports are serviced via software timeout, or so called "software interrupts". These low overhead/priority scheduler-interrupts, when serviced, move data between the SPARC and the input and output circular buffers of the SerialSmart. The SerialSmart does not generate expensive hardware interrupts and it does not generate an interrupt per character. In addition, if the SPARC CPU or other lower level interrupt hardware device (disk drive, etc.) is busy, the SerialSmart will buffer the data and defer the servicing of its ports in favor of the more time-critical CPU/IO task.

Effect of Using Software Interrupts

The only effect of the above-mentioned deferral is to make the user level read operation move a larger chunk of data through a STREAM. Hence, a lightly loaded system might get 10 characters in a single servicing of a serial port, while a heavily loaded system might take a little longer to service the port and may get 15 characters per servicing. No data is lost with this scheme, and the overall throughput is maintained. The SerialSmart accomplishes all this with much less overhead than a hardware interrupt scheme, because the system's main task is not being suspended by a hardware interrupt each time a character, or a packet of characters, wants to be serviced.

Intelligent Firmware Design

In addition to relieving the host computer of the overhead and responsibilities of controlling the SerialSmart serial hardware, the SerialSmart firmware provides the support for hardware flow control on all serial ports. When using either form of flow control, the device provides robust and guaranteed delivery of data at baud rates up to 232K baud.

The SerialSmart firmware is also designed to work well even in situations where no flow control of inbound serial data is possible. Each circular input buffer is 1024 bytes long, allowing ample buffer space to store raw serial data between executions of the port's device driver servicing routine. At 9600 baud, this buffer size allows the host computer to ignore the servicing of inbound data on a serial port for over a full second - something unlikely to occur even in the most heavily loaded system. Combined with the appropriate user level software, the SerialSmart is capable of supporting multiple "no flow control" inputs at 9600 baud with full data integrity.

High Throughput

By appropriately dividing the data handling between the firmware and the device driver, GNP has been able to increase dramatically the aggregate throughput of the SerialSmart over that of its predecessor, the DEI. SerialSmart can support full-bore bidirectional 38.4k Baud data transfers on up to 32 ports simultaneously, and unidirectional transfers on more than 64 ports, provided that the application level software can actually use all that data! (Note that many applications (login terminals, BBS servers, FAX servers, etc.) generally only transmit large quantities of data in one direction at a time.) These performance numbers are preliminary minima obtained from a prototype; the final performance numbers will be charted once a few more performance increases have been included in the next product release.

Non-DMA Slave Design

[ Previous ] [
Next ] [
T of C ]
When designing the SerialSmart, GNP Computers weighed the alternatives of making a memory mapped or a DMA device and concluded that a memory mapped device was more appropriate given the nature and volume of data being manipulated per device driver servicing operation.

Low CPU Overhead

Data passed down through the device driver often breaks down into 16 or 64 byte packets. Thus, a typical data transfer into our circular buffers on the SBus Adapter Card will consist of no more than 64 bytes of data. Even if the data packet is larger, the circular buffers will fill with data waiting to flow out of the serial port, limiting the flow of data from the device driver out onto the SRAM of the SBus Card. Thus, it may not be possible to push all the data in a given STREAMs packet out onto the SBus card in a single service event. Given the small amount of data being moved for each service event, we concluded that the overhead required to setup and check for DMA was not merited. The vindication for this decision can be seen in our maximum host computer CPU usage over the last several years: even for 256 serial devices on a SPARCstation 20, it has always been under 3%.

High Availability

[ Previous ] [ Next ] [
T of C ]

Tri-Stateable Drivers

SerialSmart uses the latest low-power, high-reliability RS232 transceiver chips with shutdown/ high impedance capability. This means that two SerialSmart ports may be connected in parallel to the same device, and either one may access the device, without having to switch the device between ports.

Y-Connect Capability

Using a single SerialSmart on a single SPARC, this isn't particularly useful. However, using two SerialSmarts and two hosts, this capability allows the creation of a high-availability serial solution. The only requirement is that the host application software arbitrate between the machines so that only one of them tries to control the port at once. (Should both machines try to use the same port at once, the rugged drivers used on the serial card can survive indefinitely, but the remote device will receive garbage.)

GNP has offered this popular Y-connecting capability to several large clients in custom-designed serial systems in the past; now we are making it available to the general public. Here is an example of a high-availability system providing dialup access to the Internet:

Y-Connect Diagram

Internet Access Architecture

The cross-connections between term/a and term/b on the Suns provide a path for "heartbeat" signals passed between the two CPUs. If one machine doesn't receive a proper heartbeat from the other in a specified amount of time, it can shut the other machine down and reset it from the Open Boot prompt, thus ensuring that the other machine has released all of the serial lines. Dual ethernet lines to the router are provided so that if one ethernet hub breaks, or the line is cut, there is still a communication path between the machines and between each machine and the Internet router interface. The ethernet may also be used to pass additional heartbeat signals. Each of the 64 modems is connected to both of the SerialSmart boxes. That way, if one Sun crashes, one UPS fails, or one SerialSmart fails, the other one can take over, continuing the connection on the same line.


3

Additional Benefits of SerialSmart

[ Previous ] [
Next ] [
T of C ]

MultiPort Menus

[ Previous ] [ Next ] [
T of C ]
Because of our unique shared memory SBus design, it is possible for a privileged user-level application to map in and examine the shared memory containing the SerialSmart control registers, circular buffers, and firmware. As a result, GNP developed software to enable the system administrator to examine the current data and signal status of each serial port. Modules are provided to give the administrator a Software Breakout Box and Eavesdrop mechanism to examine or debug any SerialSmart serial port.

Advanced System Administration

This feature allows administrators to examine instantly the current status of the DTR, RTS, CTS, DCD, and DSR or RI pins for any serial port from anywhere on the network, or through remote, dial-up modems. In addition, the administrator can also determine the exact flow of data into, or out of, a serial port. This can save the administrator literally hours of debugging time in identifying everything from bad cables to protocol errors.

Reliability and Service

[ Previous ] [
Next ] [
T of C ]
The SerialSmart is currently the most reliable high performance serial I/O device available for the SPARC. It is used in mission critical situations where serial data must be reliable all the time. For especially critical applications, two units may be connected in a redundant Y-connected setup to allow one host computer to take over for the other in the case of a software or hardware failure.

GNP Computers' Expertise

[ Previous ] [
Next ] [
T of C ]
One final benefit of the SerialSmart is the ability to work with GNP's technical and sales staff. GNP has world-class Sun expertise, especially in serial communication and networking. This has proved invaluable to many of our resellers, Sun sales engineers, and customers.


4

Other Serial Solutions

[ Previous ] [
Next ] [
T of C ]
In order to truly appreciate the elegance and power of the SerialSmart, it is necessary to compare its design with that of other hardware options. This section identifies the limitations of several alternatives which claim to deliver high performance serial and parallel I/O.

Network Terminal Servers

[ Previous ] [ Next ] [
T of C ]
Ethernet terminal servers have long been used in the industry to provide a general purpose serial I/ O solution in a networked environment. All terminal servers convert character based I/O into ethernet packets and push the packets over the local network to a host computer. The computer then decodes the packet and passes the data on to the appropriate user process.

CPU Impact

Unfortunately, this method requires processing and decoding a large packet every time a single character is received from any port on the network. As a result, the overhead on the host computer in servicing low level interrupts is much higher than when using the SerialSmart device. To make matters worse, as the number of ports increases, the number of interrupts to process incoming packets increases dramatically, and the "character packets" flood the network, slowing down all other network activity. All of these factors slow down the CPU's main activities.

Inefficient Data Packaging

An ethernet packet has 26 bytes of header and trailer information, and the TCP/IP header adds another 24 bytes to this. In the worst case, if a user is slowly typing single characters which must be sent in their own packets, then each character will require a 96 byte data packet, plus another 96 byte acknowledge packet, for a total of 192 bytes per character. This is almost one hundred times the SerialSmart requirement! Even if a host is sending 256-byte data packets to the server, there will still be about 150 bytes of overhead for each packet. The SerialSmart has no overhead at all.

Bandwidth Starvation

In addition to this inefficient data packaging, on a terminal server, the maximum rate of data transfer is inversely proportional to the number of ports. For example, an Ethernet line is a 10 megabit per second channel. In the best case (assuming very few packet collisions), this amounts to 1 megabyte per second of throughput on the channel. If there are 64 ports running, then each port will only be able to send about 40 packets (about 10 kbytes) per second. If packet collisions are taken into account, that rate drops to a mere 1 to 2 kilobytes per second. Furthermore, as the number of ports increases, or other machines are added to the network, then the available throughput drops off quickly. Doubling the number of ports (or adding one similar machine to the network) drops the rate to a maximum of 5 kbytes a second - less, if you take into account the increased likelihood of packet collisions. But with SerialSmart, each set of 64 ports has its own high-bandwidth channel directly to the SPARC.

Additional Complexity

In addition, terminal servers require more support than the SerialSmart: transceivers, cables, and, often, concentrators - and extra software to run the server. These additional items add cost and complexity, and require more technical support. Modular terminal servers cost even more, making this option even more expensive in dollars and resources for a large number of users.

Additional problems include the increase in host CPU and virtual memory overhead associated with each telnet or rlogin session associated with a terminal server. Each interactive user also generates an extra process in the UNIX scheduler. Thus, the basic operation of the terminal server requires many CPU intensive actions. We at GNP feel strongly that ethernet belongs in the domain of inter-computer communications, not character based I/O processing.

SCSI-based Terminal Servers

[ Previous ] [ Next ] [
T of C ]

Similar Deficiencies

SCSI-based devices suffer from the same general design flaws as do ethernet based terminal servers. As each inbound character is processed, it must be made into a packet and pushed over the SCSI bus. The packet then interrupts the host computer, which must use valuable CPU cycles decoding the packet and passing it to the appropriate user process before it can resume its main task. This unnecessarily loads down the CPU and may flood the SCSI bus with packets, greatly reducing the performance of other devices, such as disk drives, which share the same bus. Even in the case of outbound data, where more than one character might be placed into the SCSI packet, the competition between disk drives and other SCSI devices degrades system performance. The SerialSmart is a much better solution as there is no contention on the SCSI bus for drive (disk, tape, or CD) I/O. We believe that SCSI is the domain of disk drives, not serial devices.

Multiplexors

[ Previous ] [ T of C ]

Bandwidth Starvation

Multiplexors are devices which attempt to break a single data channel into multiple logical segments, allowing several I/O devices to share the same data path. To handle multiple serial lines, multiplexors, by their inherent nature, time-slice, or statistically sample a number of serial ports while using a serial channel of finite bandwidth. As a result, the throughput of data between the host computer and external devices is limited by the bandwidth of the multiplexor channel. This is disastrous when many data channels must move large volumes of data, because all the data must share the same path into and out of the host computer. This type of solution is inherently limited when compared to the solution offered by the SerialSmart, which provides a separate signal path for each serial channel.

[ T of C
]


For more information about SerialSmart, the WorkServer and other GNP Computers products and news, please contact us or visit our Website at http://www.gnp.com.


SerialSmart White Paper | SerialSmart Technical Specifications | More Info


[ Up ][ Home ][ Index ][
Search
][ Feedback ][ Contact ]

Copyright © 1996 GNP Computers, Inc.